Routines (alphabetical) > Routines: F > FULSTR

FULSTR

Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also

The FULSTR restores a row-indexed sparse array to full storage mode. If the sparse array was created with the SPRSIN function using the THRESH keyword, any values in the original array that were below the specified threshold are replaced with zeros.

Syntax

Result = FULSTR(A)

Return Value

Returns a given array to full storage mode.

Arguments

A

A row-indexed sparse array created by the SPRSIN function.

Keywords

None.

Examples

Suppose we have converted an array to sparse storage format with the following commands:

A = [[ 5.0, -0.2, 0.1], $
     [ 3.0, -2.0, 0.3], $
     [ 4.0, -1.0, 0.0]]

; Convert to sparse storage mode. All elements of the array A that
; have absolute values less than THRESH are set to zero:
sparse = SPRSIN(A, THRESH=0.5)

The variable SPARSE now contains a representation of the array A in structure form. To restore the array from the sparse-format structure:

; Restore the array:
result = FULSTR(sparse)

; Print the result:
PRINT, result

IDL prints:

5.00000 0.00000 0.00000

3.00000 -2.00000 0.00000

4.00000 -1.00000 0.00000

Note that the elements with an absolute value less than the specified threshold have been set to zero.

Version History

4.0

Introduced

See Also

LINBCG , SPRSAB , SPRSAX , SPRSIN , SPRSTP , READ_SPR , WRITE_SPR